package com.xinchuang.controller;

import javax.annotation.Resource;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;
import java.util.*;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xinchuang.role.config.RoleConfig;
import com.xinchuang.role.entity.SystemHeader;
import com.xinchuang.utils.MyUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import com.xinchuang.utils.CheckUtil;
import com.xinchuang.comment.R;
import com.xinchuang.comment.ResultCode;
import com.google.gson.Gson;

import java.text.SimpleDateFormat;

import com.xinchuang.utils.DateUtils;
import org.springframework.web.multipart.MultipartFile;
import org.apache.commons.lang3.StringUtils;
import com.xinchuang.service.NoteModService;

/**
 * NoteModController
 *
 * @date 2023-07-05
 */
@RestController
@RequestMapping("/noteMod")
@Api(value = "试模通知单模块", tags = "试模通知单模块")
public class NoteModController {
    private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    @Resource
    private NoteModService noteModService;

    @Resource
    private RoleConfig roleConfig;

    /**
     * 编辑试模通知单接口  函数名称editNote  功能描述:
     *
     * @param jsonObject 中文名:通用实体类
     * @return 返回参数{}
     */
    @PostMapping("/editNote")
    @ApiOperation("编辑试模通知单")
    public R editNote(@RequestBody JSONObject jsonObject, HttpServletRequest request) {
        String r = noteModService.editNote(jsonObject, request);
        return JSON.parseObject(r, R.class);
    }

    /**
     * 获取试模通知单列表接口接口  函数名称getNoteList  功能描述:
     *
     * @param jsonObject 中文名:通用实体类
     * @return 返回参数{}
     */
    @PostMapping("/getNoteList")
    @ApiOperation("获取试模通知单列表接口")
    public R getNoteList(@RequestBody JSONObject jsonObject, HttpServletRequest request) {
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        Set<String> sSet = new HashSet<>();
        String result = jsonLoop(jsonObject, "", methodName + "SC", sSet);
        result = result + getNoteListACS(sSet);
        if (result.length() > 0) {
            return R.fail("入参：" + result);
        } else {
            // 调用业务层代码
            R r = noteModService.getNoteList(jsonObject, request);
            return r;
        }
    }

    /**
     * 新增试模通知单接口接口  函数名称addNote  功能描述:用于手动添加试模技术通知单，注意如果是手动添加需要在添加后设计提交审核按钮获取审核人和批准人
     *
     * @param jsonObject 中文名:通用实体类
     * @return 返回参数{}
     */
    @PostMapping("/addNote")
    @ApiOperation("新增试模通知单接口")
    public R addNote(@RequestBody JSONObject jsonObject, HttpServletRequest request) {
        // 调用业务层代码
        String r = noteModService.addNote(jsonObject, request);
        return JSON.parseObject(r, R.class);
    }

    /**
     * 删除试模通知单接口接口  函数名称deleteNote  功能描述:
     *
     * @param jsonObject 中文名:通用实体类
     * @return 返回参数{}
     */
    @PostMapping("/deleteNote")
    @ApiOperation("删除试模通知单接口")
    public R deleteNote(@RequestBody JSONObject jsonObject) {
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        Set<String> sSet = new HashSet<>();
        String result = jsonLoop(jsonObject, "", methodName + "SC", sSet);
        result = result + deleteNoteACS(sSet);
        if (result.length() > 0) {
            return R.fail("入参：" + result);
        } else {
            // 调用业务层代码
            String r = noteModService.deleteNote(jsonObject);
            Set<String> aSet = new HashSet<>();
            JSONObject o = JSON.parseObject(r);
            if (o == null) {
                o = new JSONObject();
            }
            result = jsonLoop(o.get("data"), "", methodName + "AC", aSet);
            result = result + deleteNoteACB(aSet);
            if (result.length() > 0) {
                return R.fail("出参：" + result);
            }
            return JSON.parseObject(r, R.class);
        }
    }

    /**
     * 试模通知单详情接口接口  函数名称noteDetail  功能描述:
     *
     * @param jsonObject 中文名:通用实体类
     * @return 返回参数{}
     */
    @PostMapping("/noteDetail")
    @ApiOperation("试模通知单详情接口")
    public R noteDetail(@RequestBody JSONObject jsonObject) {
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        Set<String> sSet = new HashSet<>();
        String result = jsonLoop(jsonObject, "", methodName + "SC", sSet);
        result = result + noteDetailACS(sSet);
        if (result.length() > 0) {
            return R.fail("入参：" + result);
        } else {
            // 调用业务层代码
            return noteModService.noteDetail(jsonObject);
        }
    }

    /**
     * 请求甲方试模申请批准接口接口  函数名称applyToTryOut  功能描述:
     *
     * @param jsonObject 中文名:通用实体类
     * @return 返回参数{}
     */
    @PostMapping("/applyToTryOut")
    @ApiOperation("请求甲方试模申请批准接口")
    public R applyToTryOut(@RequestBody JSONObject jsonObject, HttpServletRequest request) {
        SystemHeader header = MyUtils.getHeader(request);
        // 调用业务层代码
        String r = noteModService.applyToTryOut(jsonObject, header);
        return JSON.parseObject(r, R.class);
    }


    public static String jsonLoop(Object object, String result, String methodName, Set<String> set) {
        Object v = null;
        if (object instanceof JSONArray || object instanceof ArrayList) {
            JSONArray jsonArray = new JSONArray();
            if (object instanceof ArrayList) {
                jsonArray = JSONArray.parseArray(JSON.toJSONString(object));
            } else {
                jsonArray = (JSONArray) object;
            }
            for (int i = 0; i < jsonArray.size(); i++) {
                result = jsonLoop(jsonArray.get(i), result, methodName, set);
                if (StringUtils.isNotEmpty(result)) {
                    return result;
                }
            }
        }
        if (object instanceof JSONObject) {
            JSONObject jsonObject = (JSONObject) object;
            for (Map.Entry<String, Object> entry : jsonObject.entrySet()) {
                Object o = entry.getValue();
                if (o instanceof JSONArray || o instanceof ArrayList) {
                    result += selectCheckMathod(entry.getKey(), entry.getValue(), methodName, set);
                    result = jsonLoop(o, result, methodName, set);
                    if (StringUtils.isNotEmpty(result)) {
                        return result;
                    }
                } else if (o instanceof JSONObject) {
                    result = jsonLoop(o, result, methodName, set);
                    if (StringUtils.isNotEmpty(result)) {
                        return result;
                    }
                } else {
//                   FIXME: 未知类型
                }
                v = entry.getValue();
                result += selectCheckMathod(entry.getKey(), v, methodName, set);
            }
        }
        return result;
    }

    private static String selectCheckMathod(String key, Object value, String methodName, Set<String> set) {
        String result = "";
        if ("editNoteSC".equals(methodName)) {
            result = editNoteSC(key, value, set);
        }
        if ("editNoteAC".equals(methodName)) {
            result = editNoteAC(key, value, set);
        }
        if ("getNoteListSC".equals(methodName)) {
            result = getNoteListSC(key, value, set);
        }
        if ("getNoteListAC".equals(methodName)) {
            result = getNoteListAC(key, value, set);
        }
        if ("addNoteSC".equals(methodName)) {
            result = addNoteSC(key, value, set);
        }
        if ("addNoteAC".equals(methodName)) {
            result = addNoteAC(key, value, set);
        }
        if ("deleteNoteSC".equals(methodName)) {
            result = deleteNoteSC(key, value, set);
        }
        if ("deleteNoteAC".equals(methodName)) {
            result = deleteNoteAC(key, value, set);
        }
        if ("noteDetailSC".equals(methodName)) {
            result = noteDetailSC(key, value, set);
        }
        if ("noteDetailAC".equals(methodName)) {
            result = noteDetailAC(key, value, set);
        }
        if ("applyToTryOutSC".equals(methodName)) {
            result = applyToTryOutSC(key, value, set);
        }
        if ("applyToTryOutAC".equals(methodName)) {
            result = applyToTryOutAC(key, value, set);
        }
        return result;
    }


    private static String editNoteSC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("moldName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具名称", isNull, 0, 255);
        }
        if ("moldLook".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具外形", isNull, 0, 255);
        }
        if ("pourTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "几点浇注", isNull, 0, 255);
        }
        if ("temperatureControlTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "几点温控（注明接口）", isNull, 0, 255);
        }
        if ("needHydraumaticStation".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "是否需要液压工作站", isNull, 0, 255);
        }
        if ("injectionMoldingTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "几点顺序注塑", isNull, 0, 255);
        }
        if ("hasLimitSwitch".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "是否有限位开关", isNull, 0, 255);
        }
        if ("tryOutDeviceId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模设备Id", isNull, 0, 255);
        }
        if ("hotSpotPairType".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "热点偶型号（J或K）", isNull, 0, 255);
        }
        if ("moldId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具编号", isNull, 0, 255);
        }
        if ("versionId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "版本Id", isNull, 0, 255);
        }
        if ("noteName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单名称", isNull, 0, 255);
        }
        if ("serialNumber".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "编号", isNull, 0, 255);
        }
        if ("hasTimeRelay".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "是否有时间继电器", isNull, 0, 255);
        }
        if ("materials".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "制件材料", isNull, 0, 255);
        }
        if ("moldCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模件数", isNull, 0, 255);
        }
        if ("color".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "制件颜色", isNull, 0, 255);
        }
        if ("materialsCount".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "材料重量", isNull, 0, 255);
        }
        if ("samplePieceWeight".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "样件重量", isNull, 0, 255);
        }
        if ("tryOutTimes".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模次数", isNull, 0, 255);
        }
        if ("plannedTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "计划试模时间", isNull);
            }
        }
        if ("moldWeight".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具重量", isNull, 0, 255);
        }
        if ("tongmanName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "钳工组长", isNull, 0, 255);
        }
        if ("targetId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模目的Id", isNull, 0, 255);
        }
        if ("subTarget".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "副试模目的", isNull, 0, 255);
        }
        if ("tryOutReasonId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模原因Id", isNull, 0, 255);
        }
        if ("announcements".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模注意事项有无特殊要求", isNull, 0, 255);
        }
        if ("announcementsImages".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "注意事项上传图片路径", isNull, 0, 99999999);
        }
        if ("projectManager".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "拟制人", isNull, 0, 255);
        }
        if ("noteId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模通知单Id", isNull, 0, 255);
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String editNoteAC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("success".equals(key)) {
            // 判断参数类型: String  num boolean datetime
        }
        if ("msg".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "返回消息", isNull, 0, 255);
        }
        if ("code".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "状态码", isNull, "0", "100000");
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String getNoteListSC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("starttime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "计划试模开始时间", isNull);
            }
        }
        if ("endtime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "计划试模结束时间", isNull, 0, 255);
        }
        if ("moldId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具编号", isNull, 0, 255);
        }
        if ("versionId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "版本Id", isNull, 0, 255);
        }
        if ("pageNum".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "页码", isNull, "0", "255");
        }
        if ("pageSize".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "每页数量", isNull, "1", "255");
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String getNoteListAC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("tongmanName".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "钳工组长", isNull, 0, 255);
        }
        if ("moldLook".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具外形", isNull, 0, 255);
        }
        if ("noteName".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单名称", isNull, 0, 255);
        }
        if ("moldId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具编号", isNull, 0, 255);
        }
        if ("dataList".equals(key)) {
            result += CheckUtil.checkJSONArray(JSONArray.parseArray(JSON.toJSONString(value)), "试模通知单列表数据", isNull);
        }
        if ("totalNum".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "总条数", isNull, "0", "255");
        }
        if ("code".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "状态码", isNull, "0", "100000");
        }
        if ("msg".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "返回消息", isNull, 0, 255);
        }
        if ("success".equals(key)) {
            // 判断参数类型: String  num boolean datetime
        }
        if ("plannedTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "计划试模时间", isNull);
            }
        }
        if ("tryOutTimes".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模次数", isNull, 0, 255);
        }
        if ("tryOutReasonName".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模原因", isNull, 0, 255);
        }
        if ("noteId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单Id", isNull, 0, 255);
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String addNoteSC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("tryOutDeviceId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模设备Id", isNull, 0, 255);
        }
        if ("hasLimitSwitch".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "是否有限位开关", isNull, 0, 255);
        }
        if ("injectionMoldingTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "几点顺序注塑", isNull, 0, 255);
        }
        if ("needHydraumaticStation".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "是否需要液压工作站", isNull, 0, 255);
        }
        if ("hotSpotPairType".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "热点偶型号（J或K）", isNull, 0, 255);
        }
        if ("temperatureControlTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "几点温控（注明接口）", isNull, 0, 255);
        }
        if ("pourTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "几点浇注", isNull, 0, 255);
        }
        if ("moldLook".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具外形", isNull, 0, 255);
        }
        if ("moldName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具名称", isNull, 0, 255);
        }
        if ("moldId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具编号", isNull, 0, 255);
        }
        if ("versionId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "版本Id", isNull, 0, 255);
        }
        if ("noteName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单名称", isNull, 0, 255);
        }
        if ("serialNumber".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "编号", isNull, 0, 255);
        }
        if ("hasTimeRelay".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "是否有时间继电器", isNull, 0, 255);
        }
        if ("materials".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "制件材料", isNull, 0, 255);
        }
        if ("moldCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模件数", isNull, 0, 255);
        }
        if ("color".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "制件颜色", isNull, 0, 255);
        }
        if ("materialsCount".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "材料重量", isNull, 0, 255);
        }
        if ("samplePieceWeight".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "样件重量", isNull, 0, 255);
        }
        if ("tryOutTimes".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模次数", isNull, 0, 255);
        }
        if ("plannedTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "计划试模时间", isNull);
            }
        }
        if ("moldWeight".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具重量", isNull, 0, 255);
        }
        if ("tongmanName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "钳工组长", isNull, 0, 255);
        }
        if ("targetId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模目的Id", isNull, 0, 255);
        }
        if ("subTarget".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "副试模目的", isNull, 0, 255);
        }
        if ("tryOutReasonId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模原因Id", isNull, 0, 255);
        }
        if ("announcements".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模注意事项有无特殊要求", isNull, 0, 255);
        }
        if ("announcementsImages".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "注意事项上传图片路径", isNull, 0, 99999999);
        }
        if ("projectManager".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "拟制人", isNull, 0, 255);
        }
        if ("checkoutName".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "审核人", isNull, 0, 255);
        }
        if ("approver".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "批准(人)", isNull, 0, 255);
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String addNoteAC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("noteId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模通知单Id", isNull, 0, 255);
        }
        if ("success".equals(key)) {
            // 判断参数类型: String  num boolean datetime
        }
        if ("msg".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "返回消息", isNull, 0, 255);
        }
        if ("code".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "状态码", isNull, "0", "100000");
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String deleteNoteSC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("noteId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模通知单Id", isNull, 0, 255);
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String deleteNoteAC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("code".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "状态码", isNull, "0", "100000");
        }
        if ("msg".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "返回消息", isNull, 0, 255);
        }
        if ("success".equals(key)) {
            // 判断参数类型: String  num boolean datetime
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String noteDetailSC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("noteId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模通知单Id", isNull, 0, 255);
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String noteDetailAC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("code".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "状态码", isNull, "0", "100000");
        }
        if ("msg".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "返回消息", isNull, 0, 255);
        }
        if ("success".equals(key)) {
            // 判断参数类型: String  num boolean datetime
        }
        if ("hasLimitSwitch".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "是否有限位开关", isNull, 0, 255);
        }
        if ("injectionMoldingTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "几点顺序注塑", isNull, 0, 255);
        }
        if ("needHydraumaticStation".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "是否需要液压工作站", isNull, 0, 255);
        }
        if ("hotSpotPairType".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "热点偶型号（J或K）", isNull, 0, 255);
        }
        if ("temperatureControlTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "几点温控（注明接口）", isNull, 0, 255);
        }
        if ("pourTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "几点浇注", isNull, 0, 255);
        }
        if ("moldLook".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具外形", isNull, 0, 255);
        }
        if ("moldName".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具名称", isNull, 0, 255);
        }
        if ("moldID".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具编号", isNull, 0, 255);
        }
        if ("versionId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "版本ID", isNull, 0, 255);
        }
        if ("noteName".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单名称", isNull, 0, 255);
        }
        if ("serialNumber".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "编号", isNull, 0, 255);
        }
        if ("hasTimeRelay".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "是否有时间继电器", isNull, 0, 255);
        }
        if ("materials".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "制件材料", isNull, 0, 255);
        }
        if ("moldCount".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模件数", isNull, 0, 255);
        }
        if ("color".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "制件颜色", isNull, 0, 255);
        }
        if ("materialsCount".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "材料用量", isNull, 0, 255);
        }
        if ("samplePieceWeight".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "样件重量", isNull, 0, 255);
        }
        if ("tryOutTimes".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模次数", isNull, 0, 255);
        }
        if ("plannedTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "计划试模时间", isNull);
            }
        }
        if ("moldWeight".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具重量", isNull, 0, 255);
        }
        if ("tongmanName".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "钳工组长", isNull, 0, 255);
        }
        if ("targetId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模目的Id", isNull, 0, 255);
        }
        if ("subTarget".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "副试模目的", isNull, 0, 255);
        }
        if ("tryOutReasonId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模原因Id", isNull, 0, 255);
        }
        if ("announcements".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模注意事项有无特殊要求", isNull, 0, 255);
        }
        if ("announcementsImages".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "注意事项上传图片路径", isNull, 0, 99999999);
        }
        if ("projectManager".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "拟制人", isNull, 0, 255);
        }
        if ("checkoutName".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "审核人", isNull, 0, 255);
        }
        if ("approver".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "批准(人)", isNull, 0, 255);
        }
        if ("tryOutDeviceId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模设备Id", isNull, 0, 255);
        }
        if ("noteId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模通知单Id", isNull, 0, 255);
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String applyToTryOutSC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("tryOutDeviceId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模设备Id", isNull, 0, 255);
        }
        if ("hasLimitSwitch".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "是否有限位开关", isNull, 0, 255);
        }
        if ("injectionMoldingTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "几点顺序注塑", isNull, 0, 255);
        }
        if ("needHydraumaticStation".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "是否需要液压工作站", isNull, 0, 255);
        }
        if ("hotSpotPairType".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "热点偶型号（J或K）", isNull, 0, 255);
        }
        if ("temperatureControlTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "几点温控（注明接口）", isNull, 0, 255);
        }
        if ("pourTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "几点浇注", isNull, 0, 255);
        }
        if ("moldLook".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具外形", isNull, 0, 255);
        }
        if ("moldName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具名称", isNull, 0, 255);
        }
        if ("moldId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具编号", isNull, 0, 255);
        }
        if ("versionId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "版本Id", isNull, 0, 255);
        }
        if ("noteName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单名称", isNull, 0, 255);
        }
        if ("serialNumber".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "编号", isNull, 0, 255);
        }
        if ("hasTimeRelay".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "是否有时间继电器", isNull, 0, 255);
        }
        if ("materials".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "制件材料", isNull, 0, 255);
        }
        if ("moldCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模件数", isNull, 0, 255);
        }
        if ("color".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "制件颜色", isNull, 0, 255);
        }
        if ("materialsCount".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "材料用量", isNull, 0, 255);
        }
        if ("samplePieceWeight".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "样件重量", isNull, 0, 255);
        }
        if ("tryOutTimes".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模次数", isNull, 0, 255);
        }
        if ("plannedTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "计划试模时间", isNull);
            }
        }
        if ("moldWeight".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具重量", isNull, 0, 255);
        }
        if ("tongmanName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "钳工组长", isNull, 0, 255);
        }
        if ("targetId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模目的Id", isNull, 0, 255);
        }
        if ("subTarget".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "副试模目的", isNull, 0, 255);
        }
        if ("tryOutReasonId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模原因Id", isNull, 0, 255);
        }
        if ("announcements".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模注意事项有无特殊要求", isNull, 0, 255);
        }
        if ("announcementsImages".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "注意事项上传图片路径", isNull, 0, 99999999);
        }
        if ("projectManager".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "拟制人", isNull, 0, 255);
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String applyToTryOutAC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("code".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "状态码", isNull, "0", "100000");
        }
        if ("msg".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "返回消息", isNull, 0, 255);
        }
        if ("success".equals(key)) {
            // 判断参数类型: String  num boolean datetime
        }
        if ("approver".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "批准人", isNull, 0, 255);
        }
        if ("checkoutName".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "审核人", isNull, 0, 255);
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String editNoteACS(Set<String> set) {
        List<String> list = new ArrayList<>();
        list.add("projectManager");
        list.add("color");
        list.add("tryOutReasonId");
        list.add("tryOutTimes");
        list.add("hasLimitSwitch");
        list.add("plannedTime");
        list.add("moldId");
        list.add("moldName");
        list.add("hotSpotPairType");
        list.add("samplePieceWeight");
        list.add("needHydraumaticStation");
        list.add("serialNumber");
        list.add("targetId");
        list.add("pourTime");
        list.add("noteName");
        list.add("tryOutDeviceId");
        list.add("moldWeight");
        list.add("noteId");
        list.add("tongmanName");
        list.add("versionId");
        list.add("materials");
        list.add("temperatureControlTime");
        list.add("moldCount");
        list.add("moldLook");
        list.add("announcements");
        list.add("hasTimeRelay");
        list.add("injectionMoldingTime");
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "入参");
    }

    private static String editNoteACB(Set<String> set) {
        List<String> list = new ArrayList<>();
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "出参");
    }

    private static String getNoteListACS(Set<String> set) {
        List<String> list = new ArrayList<>();
        list.add("pageSize");
        list.add("pageNum");
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "入参");
    }

    private static String getNoteListACB(Set<String> set) {
        List<String> list = new ArrayList<>();
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "出参");
    }

    private static String addNoteACS(Set<String> set) {
        List<String> list = new ArrayList<>();
        list.add("projectManager");
        list.add("color");
        list.add("tryOutReasonId");
        list.add("tryOutTimes");
        list.add("hasLimitSwitch");
        list.add("plannedTime");
        list.add("moldId");
        list.add("hotSpotPairType");
        list.add("moldName");
        list.add("samplePieceWeight");
        list.add("needHydraumaticStation");
        list.add("serialNumber");
        list.add("targetId");
        list.add("pourTime");
        list.add("noteName");
        list.add("tryOutDeviceId");
        list.add("moldWeight");
        list.add("tongmanName");
        list.add("versionId");
        list.add("materials");
        list.add("temperatureControlTime");
        list.add("moldCount");
        list.add("moldLook");
        list.add("announcements");
        list.add("hasTimeRelay");
        list.add("injectionMoldingTime");
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "入参");
    }

    private static String addNoteACB(Set<String> set) {
        List<String> list = new ArrayList<>();
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "出参");
    }

    private static String deleteNoteACS(Set<String> set) {
        List<String> list = new ArrayList<>();
        list.add("noteId");
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "入参");
    }

    private static String deleteNoteACB(Set<String> set) {
        List<String> list = new ArrayList<>();
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "出参");
    }

    private static String noteDetailACS(Set<String> set) {
        List<String> list = new ArrayList<>();
        list.add("noteId");
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "入参");
    }

    private static String noteDetailACB(Set<String> set) {
        List<String> list = new ArrayList<>();
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "出参");
    }

    private static String applyToTryOutACS(Set<String> set) {
        List<String> list = new ArrayList<>();
        list.add("projectManager");
        list.add("color");
        list.add("tryOutReasonId");
        list.add("tryOutTimes");
        list.add("hasLimitSwitch");
        list.add("plannedTime");
        list.add("moldId");
        list.add("hotSpotPairType");
        list.add("moldName");
        list.add("samplePieceWeight");
        list.add("needHydraumaticStation");
        list.add("serialNumber");
        list.add("targetId");
        list.add("pourTime");
        list.add("noteName");
        list.add("tryOutDeviceId");
        list.add("moldWeight");
        list.add("tongmanName");
        list.add("versionId");
        list.add("materials");
        list.add("temperatureControlTime");
        list.add("moldCount");
        list.add("moldLook");
        list.add("hasTimeRelay");
        list.add("injectionMoldingTime");
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "入参");
    }

    private static String applyToTryOutACB(Set<String> set) {
        List<String> list = new ArrayList<>();
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "出参");
    }

    /**
     * 获取集合中的不同值
     *
     * @param list
     * @param set
     * @return
     */
    private static String getCollectionDifferentValue(List<String> list, Set<String> set, String flag) {
        String result = "";
        for (String str : list) {
            if (!set.contains(str)) {
                result += str + ",";
            }
        }
        if (StringUtils.isNotEmpty(result)) {
            result = StringUtils.strip(result, ",");
            result = "---" + flag + ":" + result + "为必填参数";
        }
        return result;
    }
}
